package com.tianqu.tms.dao;

import java.util.List;

import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.dto.UserDto;

public interface UserDao {

	public UserDto findUserProfileByLoginid(String loginid) throws TmsDaoException;
	
	/**
	 * 添加用户信息
	 * @throws TmsDaoException 
	 */
	public void saveUserInfo(UserDto dto) throws TmsDaoException;
	
	/**
	 * 查询所有用户信息
	 * @throws TmsDaoException 
	 */
	public List<UserDto> getAllUserInfo(int userClass,int uniqueid) throws TmsDaoException;
	
	
	/**
	 * 根据userId查询出用户信息
	 * @throws TmsDaoException 
	 */
	public UserDto findUserInfoByUserId(String userId,int id) throws TmsDaoException;
	
	/**
	 * 根据主键ID查询出单条用户信息
	 * @throws TmsDaoException 
	 */
	public UserDto findUserInfoById(long id) throws TmsDaoException;
	
	public List<UserDto> findAllUser() throws TmsDaoException;
	
	/**
	 * 根据用户ID查询该用户密码信息
	 * @throws TmsDaoException 
	 */
	public UserDto findPasswordById(int id, String password) throws TmsDaoException;

	
	/**
	 * 修改用户密码
	 * @throws TmsDaoException 
	 */
	public void updatePasswordById(int id,String newPassword) throws TmsDaoException;
	/**
	 * 修改用户密码
	 * @throws TmsDaoException 
	 */
	public void updatePasswordInfoById(int id,String newPassword,int updateUserId) throws TmsDaoException;
	
	/**
	 * 修改用户信息
	 * @throws TmsDaoException 
	 */
	public void updateUserInfoById(UserDto dto) throws TmsDaoException;
	
	/**
	 * 删除用户信息
	 * @throws TmsDaoException 
	 */
	public void deleteUserInfoById(int id) throws TmsDaoException;
	/**
	 * 
	 * 根据登录名修改帐号状态信息
	 */
	public void updateLoginStatusByUserId(UserDto dto) throws TmsDaoException;
	
	public void updatePasswordByUserId(String password,String userId,int updateUserId) throws TmsDaoException;
	/***
	 * 查询所有状态为1的用户信息
	 */
	
	public  List<UserDto>  findIpadUser() throws TmsDaoException;
	
	
	@SuppressWarnings("unchecked")
	public List findUserByUcId(int ucId)throws TmsDaoException;
	
	public List findCyUserByUcId(int ucId,int roleId)throws TmsDaoException;
	/**
	 *会员和经办人部分更新登录信息
	 */
	public void updateLoginInfoAtAttn(UserDto dto)throws TmsDaoException;
	public List<UserDto> getUserListByRole()throws TmsDaoException;
	/**
	 *判断用户名是否重复
	 */
	public boolean isRepeatUserId(String userId) throws TmsDaoException;
	
}
